Experimental environment: Virtual machine: VirtualBox 5.0.24 r108355 operating system: rhel-server-6.5-x86_64
Saw the Liu Xiang soldier Big:
use Udev on Linux 6 to troubleshoot RAC ASM storage device name ProblemsI operated a, previously in the linux5 when I was using asmlib to bind ASM, reference to think twice, I am in the creation of virtual hard disk in the SCSI format of the hard drive, in the Linux 5 when there is no problem, but I am in Linux 6 There is a problem with Udev binding asm:
I. Environment Description RHEL 6.6 + Oracle 11.2.0.4 storage replacement, need to add a new disk, replace the old storage disk, the following is the test steps. II. test process [[[emailprotected] ~]# cd/etc/udev[[emailprotected] udev]# lsmakedev.d rules.d udev.conf[[email protected] udev]# CD rules.d/[[emailprotected] rules.d]# ls55-usm.rules 60-pcmcia.rules 70- Persistent-net.rules 98-kexec.rules60-fprint-autosuspend.rules 60-raw.rules 90-alsa.rules 99- Oracle-asmdevices.rules60-openct.rules
device to the system through the scsi id. The following operations get the shared storage scsi id on my local machine:
[Root @ cl6-11gr2-rac1 ~] #/Sbin/scsi_id -- whitelisted -- replace-whitespace -- device =/dev/sdb1ATA_VBOX_HARDDISK_VBf1082ced-38c590fb[Root @ cl6-11gr2-rac1 ~] #/Sbin/scsi_id -- whitelisted -- replace-whitespace -- device =/dev/sdc1ATA_VBOX_HARDDISK_VBcb889b15-45566527[Root @ cl6-11gr2-r
vzwc1:~ # uname -aLinux vzwc1 3.0.76-0.11-default #1 SMP Fri Jun 14 08:21:43 UTC 2013 (ccab990) x86_64 x86_64 x86_64 GNU/Linuxvzwc1:~ # cat /etc/issueWelcome to SUSE Linux Enterprise Server 11 SP3 (x86_64) - Kernel \r (\l).
Add and edit the/etc/scsi_id.config File
options=--whitelisted --replace-whitespaceAdd/etc/udev/rules. d/99-oracle-asmdevices.rules
for i in b c d e f g h idoecho "KERNEL==\"sd*\", SUBSYSTEM==\"block\", PROGRAM==\"/lib/udev/scsi_i
storage in My computer:[Email protected] ~]#/sbin/scsi_id--whitelisted--replace-whitespace--device=/dev/sdb1ata_vbox_harddisk_vbf1082ced-38c590fb[Email protected] ~]#/sbin/scsi_id--whitelisted--REPLACE-WHITESPACE--DEVICE=/DEV/SDC1ata_vbox_harddisk_vbcb889b15-45566527[Email protected] ~]#/sbin/scsi_id--whitelisted--REPLACE-WHITESPACE--DEVICE=/DEV/SDD1ata_vbox_har
. Edit the/etc/scsi_id.config file. If the file does not exist, create the file and add the following lines:
Options = -- whitelisted -- replace-whitespace
Note: In my tests, this step can be omitted
2. Obtain the uuid of the disk to be bound to the ASM disk. For example, if we want to use/dev/SDC as the ASM disk, then:
# Scsi_id -- whitelisted -- replace-whitespace -- device =/dev/S
Configure ASMdisk using UDEV in SUSE Linux
Vzwc1 :~ # Uname-Linux vzwc1 3.0.76-0.11-default #1 SMP Fri Jun 14 08:21:43 UTC 2013 (ccab990) x86_64 x86_64 x86_64 GNU/LinuxVzwc1 :~ # Cat/etc/issueWelcome to SUSE Linux Enterprise Server 11 SP3 (x86_64)-Kernel \ r (\ l ).
Add and edit the/etc/scsi_id.config File
Options = -- whitelisted -- replace-whitespace
Add/etc/udev/rules. d/99-Oracle-asmdevices.rules
For I in B c d e f g h IDoEcho "KERNEL = \" sd * \
=--whitelisted--replace-whitespace
Note: In my test, this step can be omitted
2 Get the disk UUID that needs to be bound to ASM disk, for example, if we want to use/DEV/SDC as ASM disks, then:
# scsi_id--whitelisted--replace-whitespace--DEVICE=/DEV/SDC
1ata_vbox_harddisk_vb36a9e548-1838194a
Or
#/sbin/scsi_id-g-u-d/dev/sdb
Sata_vbox_harddisk_vbd306dbe0-df3367e3_
3 new/etc/udev/rules.d/99-oracle-a
1. Add record to/etc/scsi_id.configecho "options=--whitelisted--replace-whitespace" >>/etc/scsi_id.config2. In this example, the block device sdb-> SDD needs to be bound[[email protected] ~]# for i in B c D;> Do> echo "kernel==\" sd*\ ", bus==\" scsi\ ", program==\"/sbin/scsi_id--whitelisted--replace-whitespace--device=/dev/ \ $name \ ", result==\" '/sbin/scsi_id--white
Identification Disk (/SBIN/SCSI_ID)
Oracle Linux 5 uses the following script:
#! /bin/shfor I in B c D E F g do echo "kernel==\" sd*\ ", bus==\" scsi\ ", program==\"/sbin/scsi_id-g-u-s/block/\ $na Me\ ", result==\" '/sbin/scsi_id/block/sd$i ' \ ", name=\" asm-disk$i\ ", owner=\" grid\ ", group=\" asmadmin\ ", MODE=\" 0660\ ""
Oracle Linux 6 uses the following script:
#! /bin/shfor I in B c D E F g do echo "kernel==\" sd*\ ", bus==\" scsi\ ", program==\"/sbin/scs
echo "# # $i: ' scsi_id-g-u-s/block/$i '"; Done(2) Redhat 6 Enterprise Linux is as follows:#/sbin/scsi_id-g-u/dev/sdbOr#/sbin/scsi_id-g-u/block/sdbOr#/sbin/scsi_id--whitelist [--replace-whitespace] [--device=]/dev/sdbShell Script# for I in ' cat/proc/partitions | awk {' Print $4 '} |grep SD '; Do echo "# # $i: ' scsi_id--whitelist--replace-whitespace/dev/$i '"; DoneSecond, write to Udev. Rules(1) for the entire disk binding write 99-oracle-asmdevices.rules (file name, test can be arbitrarily or
1. Edit the/etc/scsi_id.config file, if the file does not exist, create the file, and add the following line:Options=–whitelisted–replace-whitespace2. Get the disk UUID that needs to be bound to ASM disk, for example we want to use/DEV/SDC and/DEV/SDD as ASM disks, then:#/LIB/UDEV/SCSI_ID–WHITELISTED–REPLACE-WHITESPACE–DEVICE=/DEV/SDC1ata_vbox_harddisk_vb36a9e548-1838194a#/LIB/UDEV/SCSI_ID–
Linux 6 of fengge. For more information, see http://www.itpux.com/thread-65-1-1.html. Here, the "Multi-disk non-partition mode" is used ":
1. Prepare the following three Disks (not partitioned) for the following purposes:Crsdg 10gDGSYSTEM 10gDGDATA 10g[Root @ oradb ~] # Fdisk-l
Disk/dev/sdc: 10.7 GB, 10737418240 bytes
Disk/dev/sdd: 10.7 GB, 10737418240 bytes
Disk/dev/sde: 10.7 GB, 10737418240 bytes
2. Configure udev
2.1 edit the/etc/scsi_id.config file. If the file does not exist, create the fi
. Edit the/etc/scsi_id.config file. If the file does not exist, create the file and add the following lines:
Options = -- whitelisted -- replace-whitespace
Note: In my tests, this step can be omitted.
2. Obtain the uuid of the disk to be bound to the ASM disk. For example, if we want to use/dev/SDC and/dev/SDD as the ASM disk, then:
# Scsi_id -- whitelisted -- replace-whitespace -- device =/dev/SDC
1ata_vbo
=--whitelisted--replace-whitespaceNote: In my tests, this step can be omitted.2. Get the disk UUID that needs to be bound to ASM disk, for example we want to use/DEV/SDC and/DEV/SDD as ASM disks, then:# scsi_id--whitelisted--replace-whitespace--DEVICE=/DEV/SDC1ata_vbox_harddisk_vb36a9e548-1838194a# scsi_id--whitelisted--replace-whitespace--DEVICE=/DEV/SDD1ata_vbo
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.